#ifndef BBOX_H
#define BBOX_H

#include "Vector.h"
#include "Ray.h"

class BBox
{
public:
    BBox(const Point3f &min = Point3f(), const Point3f &max = Point3f());

    Point3f center() const
    { return min + (max - min)*0.5; }

    BBox& doUnion(const Point3f &);

    bool intersect(const Ray& ray) const;

    Point3f min;
    Point3f max;
};


#endif // BBOX_H
